using UnityEngine;

public class SceneUICameraData : MonoBehaviour
{
    [SerializeField]
    public bool Enabled;
    [SerializeField]
    public CameraClearFlags ClearFlags;
    [SerializeField]
    public Color BackgroundColor;
    [SerializeField]
    public int CullingMask;
    [SerializeField]
    public bool Orthographic;
    [SerializeField]
    public float FieldOfView;

    void Start()
    {
        var ui_cam = GameObject.Find("UI/Camera")?.GetComponent<Camera>();
        if (ui_cam != null)
        {
            ui_cam.enabled = Enabled;
            ui_cam.clearFlags = ClearFlags;
            ui_cam.backgroundColor = BackgroundColor;
            ui_cam.cullingMask = CullingMask;
            ui_cam.orthographic = Orthographic;
            ui_cam.fieldOfView = FieldOfView;
        }

        var touch_cam = GameObject.Find("Touch/Camera")?.GetComponent<Camera>();
        if (touch_cam != null)
        {
            touch_cam.backgroundColor = BackgroundColor;
        }
    }

}
